class CreateResources < ActiveRecord::Migration
  def self.up
    create_table :resources do |t|
      t.column :first_name, :string, :limit => 50, :null => false
      t.column :last_name, :string, :limit => 50, :null => false
      t.column :title, :string, :limit => 5
      t.column :post_address_1, :string, :limit => 30
      t.column :post_address_2, :string, :limit => 30
      t.column :post_address_suburb_id, :integer
      t.column :post_address_city_id, :integer
      t.column :post_address_post_code, :integer
      t.column :resource_type_id, :integer, :null => false
      t.column :cellphone_number, :string, :limit => 15
      t.column :work_telephone_number, :string, :limit => 15
      t.column :home_telephone_number, :string, :limit => 15
      t.column :fax_number, :string, :limit => 15
      t.column :email_address, :string, :limit => 100
      t.column :gender, :string, :limit=>6
      t.column :race_id, :integer
      
      t.timestamps
    end
  end

  def self.down
    drop_table :resources
  end
end
